{% extends "home.html" %}
{% load pagination_tags %}

{% block title %} Attache a note - {{ block.super }} {% endblock %}

{% block ads%}
{% endblock %}


{% block content %}

<div class="row">
	<div class="span14">

	<div class="well">
		<a class="close" href="#">&times;</a>
		<p>
		<strong>
		<a href="{% url thought_update thought_id=thought.id dontvalidate='no'%}">{{ thought.title }}: </a>&nbsp;
		</strong> 
		<p>
		{{ thought.description }}
		</p>
		</div>

	</div>


{% if attached_booknotes  %}
<div class="span14">
<ul class="breadcrumb">
        <li><a class="active" href="#">Attache Book Notes</a> <span class="divider">/</span></li>
      </ul>
</div>

	
{% autopaginate attached_booknotes 4 %} 
{% for booknote in attached_booknotes %}
	<div class="span4">
   	<div class="alert-message block-message warning">
       	 	<a class="close" href="#">&times;</a>
        	<p><strong><a href="{% url book_upnote note_id=booknote.id dontvalidate='no' %} ">{{ booknote.book.title.upper }}: </a></strong> {{ booknote.snippet }} </p>

        	 <div class="alert-actions">
        <a class="btn small" 
          href="{% url thought_unatnote thought_id=thought.id note_id=booknote.id note_type='book'%}">
         UnAttach</a> 
        </div>

      	</div>
	</div>
{% endfor %}
	<div class="span14">
	  {% paginate %}
	</div>



{% endif %}


{% if attached_articlenotes  %}
<div class="span14">
<ul class="breadcrumb">
        <li><a class="active" href="#">Attache Article Notes</a> <span class="divider">/</span></li>
      </ul>
</div>

{% autopaginate attached_articlenotes 4 %} 
{% for articlenote in attached_articlenotes %}
<div class="span4">
   <div class="alert-message block-message warning">
        <a class="close" href="#">&times;</a>
        <p><strong><a href="{% url article_upnote note_id=articlenote.id dontvalidate='no' %}">{{ articlenote.article.title.upper }}: </a></strong> {{ articlenote.snippet }} </p>

        <div class="alert-actions">
        <a class="btn small" 
          href="{% url thought_unatnote thought_id=thought.id note_id=articlenote.id note_type='article'%}">
         UnAttach</a> 

        </div>
   </div>
</div>

{% endfor %}
<div class="span14">
  {% paginate %}
</div>


{% endif %}




<div class="span14">
<hr>
<h6> Available book notes </h6>
</div>
{% autopaginate booknotes 4 %} 
{% for booknote in booknotes %}
<div class="span4">
   <div class="alert-message block-message warning">
        <a class="close" href="#">&times;</a>
        <p><strong><a href="{% url book_upnote note_id=booknote.id dontvalidate='no' %}">{{ booknote.book.title.upper }}: </a></strong> {{ booknote.snippet }} </p>

        <div class="alert-actions">
        <a class="btn small" 
          href="{% url thought_atnote thought_id=thought.id note_id=booknote.id note_type='book'%}">
         Attach</a> 

        </div>
      </div>
</div>

{% endfor %}
<div class="span14">
  {% paginate %}
</div>


<div class="span14">
<hr>
<h6> Available article notes </h6>
</div>
{% autopaginate articlenotes 4 %} 
{% for articlenote in articlenotes %}
<div class="span4">
   <div class="alert-message block-message warning">
        <a class="close" href="#">&times;</a>
        <p><strong><a href="{% url article_upnote note_id=articlenote.id dontvalidate='no' %}">{{ articlenote.article.title.upper }}: </a></strong> {{ articlenote.snippet }} </p>

        <div class="alert-actions">
        <a class="btn small" 
          href="{% url thought_atnote thought_id=thought.id note_id=articlenote.id note_type='article'%}">
         Attach</a> 

        </div>
      </div>
</div>

{% endfor %}
<div class="span14">
  {% paginate %}
</div>


</div>

{% endblock %}
